Introduction

This is the most natural security definition for public-key encryption schemes, since the public key is available for anyone to see. Any realistic adversary would have access to it, and, since they know the encryption algorithm, they can use to encrypt any message they like. This is the reason why chosen-plaintext security is the minimal security guarantee which is expected of public-key encryption schemes.

Definition: CPA-Security

The efficient adversary is given the public key and can use it to encrypt messages of her choice to obtain their corresponding ciphertexts .

A public-key encryption scheme is CPA-secure if for any two messages , public key generated by and ciphertext which is the encryption of either or , the probability that Eve can guess whether belongs to or is at most negligibly greater than .

Definition Breakdown

The adversary Eve is not explicitly given access to an encryption oracle because she has the public key, knows the encryption algorithm and can thus encrypt any messages she likes. She is also free to choose the messages . The public-key encryption scheme is considered CPA-secure if no matter what Eve does, she cannot guess if a ciphertext is the encryption of or with significantly better probability than .

As with private-key CPA-security, any public-key encryption scheme must use a nondeterministic function.

Necessity of Randomness

There is no CPA-secure public-key encryption scheme with a deterministic encryption function .

If the encryption algorithm were deterministic, then Eve would be able to simply pass and to it and compare with the resulting ciphertexts. Non-determinism protects against this by producing a different ciphertext every time that the same message is encrypted.